﻿@using FCTC_Web.Models
@model FCTC_Web.Utilities.Page<SessionArrangement>
@{
    ViewBag.Title = "Index";
}
<h2>
    Index</h2>
 <style>
     .tableIndex{ width:95%;}
 </style>
<p>
    @Html.ActionLink("创建", "Create")
</p>

<table class="tableIndex">
    <tr>
        <th>
            开始
        </th>
        <th>
            结束
        </th>
        <th>
            日期
        </th>
        <th>
            队1
        </th>
        <th>
            队2
        </th>
        <th>
            比分
        </th>
        <th>
            场地
        </th>
        <th>
            裁判
        </th>
        <th>
         操作
        </th>
    </tr>
    @foreach (var item in Model.CurrentRecords)
    {
        <tr>
            <td>
                @Html.DisplayFor(modelItem => item.StartTime)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.EndTime)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Day)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.LeftTeam.FullName)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.RightTeam.FullName)
            </td>
            
            <td>
                @item.GetScore()
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Field)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Referee)
            </td>
            
            <td>
                @Html.ActionLink("编辑", "Edit", new { id = item.ID }) |
                @Html.ActionLink("详细信息", "Details", new { id = item.ID }) |
                @Html.ActionLink("删除", "Delete", new { id = item.ID })
            </td>
        </tr>
    }
</table>
@Html.Pager(Model, "/SessionArrangement/Index")
